<template>
  <div>
    <!-- 轮播图 -->
    <van-swipe class="my-swipe" :autoplay="2000">
      <van-swipe-item v-for="(image,index) in images" :key="index">
        <img :src="image.picUrl" style="width: 100%" />
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
export default {
  data() {
    return {
      images: []
    };
  },
  mounted() {
    this.$APIClient
      .getBanner()
      .then(res => {
        //检测
        // console.log(res.data.data);
        //赋值
        this.images = res.data.data;
      })
      .catch(err => {
        console.error(err);
      });
  }
};
</script>

<style>
</style>